<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>垫款资金流水表 管理</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<form id="capAdvFund_form">
    <div class="fieldset1 tabel_col tabel_col_1 clearFix">
        
<div class="fieldBox col_100">
	<div class="label">资金编号 垫款（DK+ID）冲销（HB+ID）</div>
	<div class="field">
		<input name="code" id="code" type="text" class="ui-textbox" value="${capAdvFundVO.code}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">批次号</div>
	<div class="field">
		<input name="batchId" id="batchId" type="text" class="ui-textbox" value="${capAdvFundVO.batchId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户ID</div>
	<div class="field">
		<input name="cstId" id="cstId" type="text" class="ui-textbox" value="${capAdvFundVO.cstId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户名称</div>
	<div class="field">
		<input name="cstNm" id="cstNm" type="text" class="ui-textbox" value="${capAdvFundVO.cstNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">支付表ID</div>
	<div class="field">
		<input name="paySchId" id="paySchId" type="text" class="ui-textbox" value="${capAdvFundVO.paySchId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">支付表号</div>
	<div class="field">
		<input name="paySchNo" id="paySchNo" type="text" class="ui-textbox" value="${capAdvFundVO.paySchNo}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">期次</div>
	<div class="field">
		<input name="payPd" id="payPd" type="text" class="ui-textbox" value="${capAdvFundVO.payPd}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">金额</div>
	<div class="field">
		<input name="payAmt" id="payAmt" type="text" class="ui-textbox" value="${capAdvFundVO.payAmt}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">付款银行账户ID(SYS_BK_ACC_INFO表ID、BANK_ACC_INFO表ID)</div>
	<div class="field">
		<input name="payBkId" id="payBkId" type="text" class="ui-textbox" value="${capAdvFundVO.payBkId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">付款账号</div>
	<div class="field">
		<input name="payAccNo" id="payAccNo" type="text" class="ui-textbox" value="${capAdvFundVO.payAccNo}" validate="{required:true,maxlength:64}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">付款账户</div>
	<div class="field">
		<input name="payAccNm" id="payAccNm" type="text" class="ui-textbox" value="${capAdvFundVO.payAccNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">付款开户银行</div>
	<div class="field">
		<input name="payBkNm" id="payBkNm" type="text" class="ui-textbox" value="${capAdvFundVO.payBkNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">付款银行开户行号</div>
	<div class="field">
		<input name="payBkNo" id="payBkNo" type="text" class="ui-textbox" value="${capAdvFundVO.payBkNo}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">收款银行账户ID(SYS_BK_ACC_INFO表ID、BANK_ACC_INFO表ID)</div>
	<div class="field">
		<input name="dueBkId" id="dueBkId" type="text" class="ui-textbox" value="${capAdvFundVO.dueBkId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">收款账户</div>
	<div class="field">
		<input name="dueAccNo" id="dueAccNo" type="text" class="ui-textbox" value="${capAdvFundVO.dueAccNo}" validate="{required:true,maxlength:64}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">收款户名</div>
	<div class="field">
		<input name="dueAccNm" id="dueAccNm" type="text" class="ui-textbox" value="${capAdvFundVO.dueAccNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">收款开户银行</div>
	<div class="field">
		<input name="dueBkNm" id="dueBkNm" type="text" class="ui-textbox" value="${capAdvFundVO.dueBkNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">收款银行开户行号</div>
	<div class="field">
		<input name="dueBkNo" id="dueBkNo" type="text" class="ui-textbox" value="${capAdvFundVO.dueBkNo}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">资金属性(CAP0027 ): 1.租赁人还款 2.垫款 3.租赁人还款红冲</div>
	<div class="field">
		<select name="capAttrCd" id="capAttrCd" data-value="${capAdvFundVO.capAttrCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${capAttrCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">垫款时间</div>
	<div class="field">
		<input name="advTm" id="advTm" type="text" class="ui-textbox" value="${capAdvFundVO.advTm}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">垫款回拨时间</div>
	<div class="field">
		<input name="retTm" id="retTm" type="text" class="ui-textbox" value="${capAdvFundVO.retTm}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">垫款/回拨状态  0.未提交 1.已提交</div>
	<div class="field">
		<select name="fundStsCd" id="fundStsCd" data-value="${capAdvFundVO.fundStsCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${fundStsCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">关联垫款资金ID</div>
	<div class="field">
		<input name="relFundId" id="relFundId" type="text" class="ui-textbox" value="${capAdvFundVO.relFundId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">日罚息率(%)</div>
	<div class="field">
		<input name="penaltyRate" id="penaltyRate" type="text" class="ui-textbox" value="${capAdvFundVO.penaltyRate}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">资金使用成本</div>
	<div class="field">
		<input name="capUseCost" id="capUseCost" type="text" class="ui-textbox" value="${capAdvFundVO.capUseCost}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">(支付表)所属事业部</div>
	<div class="field">
		<select name="buOrgCd" id="buOrgCd" data-value="${capAdvFundVO.buOrgCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${buOrgCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">备注</div>
	<div class="field">
		<textarea name="fundRem" id="fundRem" type="text" class="ui-textbox" cols="25" rows="4" value="${capAdvFundVO.fundRem}" validate="{required:false,maxlength:200}">${capAdvFundVO.fundRem}</textarea>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">版本</div>
	<div class="field">
		<input name="version" id="version" type="text" class="ui-textbox" value="${capAdvFundVO.version}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
    </div>
    <div class="btnsBox">
        <span id="saveCapAdvFund_Btn" class="sq-button sq-button-round l-dialog-btn-ok">保存</span>
        <input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
    </div>
</form>
<script>
    $(function() {
        var capAdvFundId = "${capAdvFundVO.id}";//主键ID
        $("#capAdvFund_form").ligerForm({
            validate: true
        });
        /*保存*/
        $("#saveCapAdvFund_Btn").click(function (event) {
            var form = liger.get("capAdvFund_form");
            if (!form.valid()) {
                $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
                return false; //验证不通过，不执行以下代码
            }
            var data = form.getData();
            $.ligerDialog.hide();
            var _url;
            if (capAdvFundId == '') {//新增
                _url = '<%=path%>/capital/capAdvFund/add.do';
            } else {//修改
                _url = '<%=path%>/capital/capAdvFund/modify.do?id=' + capAdvFundId;
            }
            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: data,
                url: _url,
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        parent.$("#clearBtn").click();
                        parent.$("#searchBtn").click();
                        frameElement.dialog.close();
                        
                        //$("#resetBtn").click();
                        //回调刷新列表
                        //var callback=frameElement.W2W.callback;
                        //Remove_navTab();
                        //callback();
                    } else {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        });
    });
</script>
</body>
</html>
